<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="/luntanshequ/Public/css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="/luntanshequ/Public/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="/luntanshequ/Public/css/style.css" rel="stylesheet" type="text/css" />
<link href="/luntanshequ/Public/lib/font-awesome/font-awesome.min.css" rel="stylesheet" type="text/css" />
<!--[if IE 7]>
<link href="lib/font-awesome/font-awesome-ie7.min.css" rel="stylesheet" type="text/css" />
<![endif]-->
<link href="/luntanshequ/Public/lib/iconfont/iconfont.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]--><title>管理员列表</title>
<style type="text/css">
    .text-centerpage{
        text-align: center;
    }

    .pagination{
        display: inline-block;
        padding-left: 0;
        margin: 21px 0;
        border-radius: 3px;
        text-align: center;
        position: relative;
        width: 100%;
    }
    .pagaBox{
      height: 50px;
      margin: 0 auto;
      position: absolute;
      left: 50%;
    }
    .text-center a:hover{
        text-decoration: none;
    }
    .num{
        position: relative;
        float: left;
        padding: 6px 12px;
        line-height: 1.5;
        text-decoration: none;
        color: #009a61;
        background-color: #fff;
        border: 1px solid #ddd;
        margin-left: -1px;
    }

    .current{
        position: relative;
        float: left;
        padding: 6px 12px;
        line-height: 1.5;
        text-decoration: none;
        color: #009a61;
        background-color: #fff;
        border: 1px solid #ddd;
        margin-left: -1px;
        z-index: 2;
        color: #fff;
        background-color: #009a61;
        border-color: #009a61;
        cursor: default;
    }

    .prev{
        position: relative;
        float: left;
        padding: 6px 12px;
        line-height: 1.5;
        text-decoration: none;
        color: #009a61;
        background-color: #fff;
        border: 1px solid #ddd;
        margin-left: -1px;
    }

    .next{
        position: relative;
        float: left;
        padding: 6px 12px;
        line-height: 1.5;
        text-decoration: none;
        color: #009a61;
        background-color: #fff;
        border: 1px solid #ddd;
        margin-left: -1px;
    }
</style>
</head>
<body>
<nav class="breadcrumb"><i class="iconfont">&#xf012b;</i> 首页 <span class="c-gray en">&gt;</span> 管理员管理 <span class="c-gray en">&gt;</span> 权限管理 <a class="btn btn-success radius r mr-20" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="icon-refresh"></i></a></nav>
<div class="pd-20">
  <div class="text-c">
    <form class="Huiform" method="post" action="<?php echo U('admin/admin/addauth');?>" >
      <input type="text" placeholder="权限名称" autocomplete="off" name="title" class="input-text" style="width:150px">
      <input type="text" placeholder="模块/控制器/方法" autocomplete="off" name="name" class="input-text" style="width:150px">
      所属分类:
      <select name="cate"  size="1" style="width:150px;height;31px;" >
      <?php  foreach ($cateResult as $key => $value) { ?>
            <option value="<?php echo ($value['id']); ?>" ><?php echo ($value['cname']); ?></option>   
          <?php
 } ?>
      </select>
      <button type="submit" class="btn btn-success"  ><i class="icon-plus"></i> 添加权限节点</button>
    </form>
  </div>
  <div class="cl pd-5 bg-1 bk-gray mt-20">
    <span class="l"><a href="javascript:;" onclick="datadel()" class="btn btn-danger radius"><i class="icon-trash"></i> 批量删除</a></span>
    <span class="r">共有数据：<strong>54</strong> 条</span>
  </div>
  <table class="table table-border table-bordered table-bg">
    <thead>
      <tr>
        <th scope="col" colspan="7">权限节点</th>
      </tr>
      <tr class="text-c">
        <th width="25"><input type="checkbox" name="" value=""></th>
        <th width="40">ID</th>
        <th width="200">权限名称</th>
        <th>字段名</th>
        <th>所属分类</th>
        <th width="70">操作</th>
      </tr>
    </thead>
    <tbody>
      <?php  foreach ($authRes as $key => $value) { ?>  
              <tr class="text-c">
                <td><input type="checkbox" value="<?php echo $value['id'] ?>" name=""></td>
                <td><?php echo $value['id'] ?></td>
                <td><?php echo $value['title'] ?></td>
                <td><?php echo $value['name'] ?></td>
                <td><?php echo $value['cid'] ?></td>
                <td class="f-14"><a title="编辑" href="<?php echo U("admin/admin/adminpermissonedit",array('id'=>$value['id']));?>"  class="ml-5" style="text-decoration:none"><i class="icon-edit"></i></a> <a title="删除" href="javascript:;" onclick="admin_permission_dels(this,<?php echo ($value['id']); ?>)" class="ml-5" style="text-decoration:none"><i class="icon-trash"></i></a></td>
              </tr>
            <?php  } ?>      
    </tbody>
  </table>
  <div class="pagination">
    <div class="pagaBox">
      <?php echo $Page ?>
    </div>
  </div>
</div>
<script type="text/javascript" src="/luntanshequ/Public/lib/jquery.min.js"></script>
<script type="text/javascript" src="/luntanshequ/Public/lib/layer1.8/layer.min.js"></script>
<script type="text/javascript" src="/luntanshequ/Public/lib/laypage/laypage.js"></script> 
<script type="text/javascript" src="/luntanshequ/Public/lib/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="/luntanshequ/Public/lib/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="/luntanshequ/Public/js/H-ui.js"></script>
<script type="text/javascript" src="/luntanshequ/Public/js/H-ui.admin.js"></script> 
<script type="text/javascript" src="/luntanshequ/Public/js/H-ui.admin.doc.js"></script>
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "//hm.baidu.com/hm.js?080836300300be57b7f34f4b3e97d911";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F080836300300be57b7f34f4b3e97d911' type='text/javascript'%3E%3C/script%3E"));


/*管理员-权限-删除*/
function admin_permission_dels(obj,id){
  layer.confirm('角色删除须谨慎，确认要删除吗？',function(index){
    var layerObj = layer;
    var theid = id;
    var thisObj = $(obj);
    $.ajax({
      url: '<?php echo U("admin/admin/adminpermissondelete");?>',
      type: 'POST',
      dataType: 'json',
      data: {thisid: theid},
      success:function(data){
        thisObj.parents("tr").remove();
        layerObj.msg('已删除!',1);
      },
      error:function(){
        layerObj.msg('通信错误',1);
      }
    })
    
  });
}
</script>
</body>
</html>